< previous page page_352 next page >

Page 352
An Overview of the Reporting and Printing Subsystem
Visual Basic offers you several mechanisms for designing and creating reports. These mechanisms, which are the key areas of concern in this subsystem, include
Crystal Reports
Access Reports
Rich Text Box Reports
The pivotal class methods for these three reporting mechanisms include those operations that open the report, print the report, and save the report. These operations are members of an interface class, IReporting. I discuss this class throughout the remainder of this chapter.
Understanding the Purpose of This Subsystem
The more popularly known approach of the three reporting mechanisms is Crystal Reports. However, the Rich Text Box also offers nice functionality for reporting, though it requires a bit more coding. Using Microsoft Access Reports is also very powerful and very easy to use. The Reporting and Printing Subsystem provides a common interface to each of the three to encapsulate much of the implementation of reporting details. The following three sections provide you with some helpful, straightforward background on each of the three reporting mechanisms.
Rich Text Box Reporting
Reporting and printing with the Rich Text Box control is relatively easy, though it requires some coding from you. Of course, you can simply print the contents of the Rich Text Box with the following code:
theRichTextBox.SelPrint Printer.hDC
where theRichTextBox is a reference to a Rich Text Box, SelPrint is the method you invoke to print the contents of the control, and Printer.hDC is the handle to the default printer. However, your users might expect at least a little more visual appeal than plain text as they view the contents either online or in print form. What is the developer to do?
The Rich Text Box offers several methods and properties to help you add some visual appeal to the body information you present to the user. The most helpful include

 
< previous page page_352 next page >

If you like this book, buy it!